﻿<UserControl x:Class="Futaba.SBus.SampleApplication.MainMenu"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
						 xmlns:vm="clr-namespace:Futaba.SBus.SampleApplication"
						 d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type={x:Type vm:MainViewModel}}"
             d:DesignHeight="150" d:DesignWidth="700">
	<Ribbon>
		<Ribbon.ApplicationMenu>
			<RibbonApplicationMenu>
				<RibbonApplicationMenuItem Header="Quit" Command="{Binding QuitCommand}" />
			</RibbonApplicationMenu>
		</Ribbon.ApplicationMenu>
		<RibbonTab Header="General">
			<RibbonGroup Header="Model Configuration">
				<RibbonButton Label="Load..." Command="{Binding LoadConfigCommand}" />
				<RibbonButton Label="Save" Command="{Binding SaveConfigCommand}" CommandParameter="False" />
				<RibbonButton Label="Save as..." Command="{Binding SaveConfigCommand}" CommandParameter="True" />
			</RibbonGroup>
			<RibbonGroup Header="Sensors">
				<RibbonButton Label="Load Sensor Configuration..." Command="{Binding LoadSensorConfigCommand}" />
			</RibbonGroup>
		</RibbonTab>
		<RibbonTab Header="S.BUS">
			<RibbonGroup Header="Live Connection">
				<RibbonComboBox Label="COM-Ports">
					<RibbonGallery SelectedValue="{Binding SelectedComPort}">
						<RibbonGalleryCategory ItemsSource="{Binding ComPorts}" DisplayMemberPath="DisplayName" />
					</RibbonGallery>
				</RibbonComboBox>
				<RibbonButton Label="{Binding ConnectButtonLabel}" Command="{Binding ConnectCommand}" />
			</RibbonGroup>
			<RibbonGroup Header="Log Playback">
				<RibbonButton Label="Playback Log..." Command="{Binding PlaybackCommand}" />
				<RibbonTextBox Label="Packets/sec." Text="{Binding ParsingService.Reader.PacketsPerSecond}" />
				<RibbonTextBox Label="Offset" Text="{Binding ParsingService.Reader.FileOffset, Mode=OneWay}" IsReadOnly="True" />
				<RibbonCheckBox Label="Loop" IsChecked="{Binding ParsingService.Reader.Loop}" />
				<RibbonCheckBox Label="Pause" IsChecked="{Binding ParsingService.Reader.Pause}" />
				<RibbonCheckBox Label="End reached" IsChecked="{Binding ParsingService.Reader.EndOfStream, Mode=OneWay}" IsEnabled="False" />
			</RibbonGroup>
			<RibbonGroup Header="Data detection">
				<RibbonCheckBox Label="Channels" IsChecked="{Binding ParsingService.ChannelDataAvailable, Mode=OneWay}" IsEnabled="False" />
				<RibbonCheckBox Label="Telemetry" IsChecked="{Binding ParsingService.TelemetryDataAvailable, Mode=OneWay}" IsEnabled="False" />
			</RibbonGroup>
		</RibbonTab>
	</Ribbon>
</UserControl>
